/*
 *  Copyright 2012 Dirk Vranckaert
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package eu.vranckaert.vvl.model;

/**
 * User: DIRK VRANCKAERT
 * Date: 21/02/12
 * Time: 11:35
 */
public class TrafficInfoGraphicalEnum {
    public static final String GRAPHICAL_IMAGE_URL = "http://www.filebeeld.be/traffic/image?format=%s&region=%s&colorblind=%s";

    public enum ImageSize {
        LARGE,
        MEDIUM,
        SMALL;
    }
    
    public enum Region {
        FLANDERS("vlaanderen"),
        FLEMISH_DIAMOND("vlaamseruit"),
        ANTWERP("antwerpen"),
        BRUSSELS("brussel"),
        GHENT("gent"),
        KEMPEN("kempen"),
        KORTRIJK("kortrijk"),
        COAST("kust"),
        LEUVEN("leuven"),
        LIMBURG("limburg");

        private String value;

        Region (String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }

        public static Region getByValue(String value) {
            Region[] regions = Region.values();
            for (Region region : regions) {
                if (region.getValue().equals(value)) {
                    return region;
                }
            }
            return null;
        }
    }
}
